package cn.chenli.job.tool.engine.common;




import cn.chenli.job.tool.engine.java.JavaEngine;

import java.util.HashMap;
import java.util.Map;

/**
 * 获取动态执行脚本引擎工厂
 *
 * Created by 陈李 on 2017.08.10
 */
public final class ToolEngineFactory {
    private static final Map<String, DynamicScriptEngine> map = new HashMap<>();

    static {
        try {
            map.put("java", new JavaEngine());
        } catch (Exception e) {

        }
    }

    public static final DynamicScriptEngine getEngine(String type) {
        return map.get(type);
    }

}
